package IODemo;

import java.io.File;
import java.io.IOException;

public class IODemo1 {
    public static void main(String[] args) throws IOException {
        //File f = new File("D:/360Downloads/test.txt");
        File f = new File("./test.txt");
        System.out.println(f.exists());
        System.out.println(f.getParent());
        System.out.println(f.getName());
        System.out.println(f.getPath());
        System.out.println(f.getAbsoluteFile());//相对路径转化为绝对路径
        System.out.println(f.getCanonicalFile());//同上/./就是Test_3_22相当于原地不动  此结果进行了化简

    }
}
